#include "test.h"
#include <unistd.h>
#include <QThread>
#include <QDebug>

Test::Test(QObject *parent) : QObject(parent),
  m_timer(new QTimer())
{
    show_pid();
    QObject::connect(m_timer, SIGNAL(timeout()), this, SLOT(display()));

    m_timer->start(1000);
}

void Test::test()
{
    show_pid();
    m_timer->setInterval(1000);
}

void Test::display()
{
    show_pid();
}

void Test::show_pid() const
{
    qDebug() << __func__ << __LINE__ << " Pid: " << QThread::currentThreadId();
}
